#ifndef UDPSERVER_H
#define UDPSERVER_H

#include <QObject>
#include <QUdpSocket>
#include <QHostAddress>
#include <QNetworkDatagram>
#include <QDebug>

class UdpServer : public QObject
{
    Q_OBJECT
public:
    UdpServer(QObject *parent = nullptr);

private slots:
    void readPendingDatagrams();

    void processTheDatagram(const QNetworkDatagram &datagram);

private:
    QUdpSocket *udpSocket;

};

#endif // UDPSERVER_H
